<script setup>
import { ref, onMounted } from 'vue'
import { navigetionNavigationList } from '@/apis/apis.js'
import RecursionMenuItem from './RecursionMenuItem.vue'

const navigationList = ref([]) // 侧边导航栏

const getNavigationList = async () => {
  const res = await navigetionNavigationList()
  navigationList.value = res.data
}

onMounted(async () => {
  await getNavigationList()
})
</script>

<template>
  <el-menu :default-active="$route.path" router>
    <RecursionMenuItem :navigationList="navigationList" />
  </el-menu>
</template>

<style scoped></style>
